package com.bdqn.zhao.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.zhao.pojo.IpFloor;
import com.bdqn.zhao.pojo.IpRoom;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 园区表 Mapper 接口
 * </p>
 *
 * @author zhangsan
 * @since 2023-04-24
 */
@Mapper
public interface IpRoomMapper extends BaseMapper<IpRoom> {


    @Select("select ip.*,ib.build_name,ifs.floor_name,irm.room_moneytype_name from ip_room ip\n" +
            "left join ip_building ib on ib.build_id=ip.build_id\n" +
            "left join ip_floor ifs on ifs.floor_id=ip.floor_id\n" +
            "left join ip_room_moneytype irm on irm.room_moneytype_id=ip.room_moneytype_id\n")
    List<IpFloor> selectALla();

}
